<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
String path = request.getContextPath();
request.setAttribute("path", path);
%>	

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我的购物车-卓应商城</title>
		
		<link rel="stylesheet" type="text/css" href="/common/css/shopcar/shopcart.css" />
		<script type="text/javascript" src="/common/js/jquery-1.11.3.js"></script>
		
		<script>
			$(document).ready(function() {

				//topbar中的下拉列表鼠标悬停事件
				$(".user").mouseover(function() {
					$(".user-menu").removeClass("hide");
				});
				$(".user").mouseout(function() {
					$(".user-menu").addClass("hide");
				});

				//推荐列表中加入购物车的鼠标悬停移开事件
				$(".xm-recommend-list").mouseover(function() {
					$(this).find(".xm-recommend-btn").show();
				});
				$(".xm-recommend-list").mouseout(function() {
					$(this).find(".xm-recommend-btn").hide();
				});
				
			});
		</script>
		
	</head>
	
	<body>
		<div class="site-header">
			<div class="container">
				<div class="header-logo">
					<a class="logo ir" href="/user/loginreg/index" title="卓应官网">
						<img src="http://localhost:8083/fileserver/logo/logo.jpg" />
					</a>
				</div>
				<div class="header-title">
					<h2>我的购物车</h2>
				</div>
				<div class="topbar-login">
					<span class="user">
						<a class="username" rel="nofollow" href="/user/userinfo">
							<span class="name">${user.userName}</span>
					<i class="iconfont">﹀</i>
					</a>
					<ul class="user-menu hide">
						<li>
							<a rel="nofollow" href="/user/userinfo">个人中心</a>
						</li>
						<li>
							<a rel="nofollow" href="/user/mycollect">我的收藏</a>
						</li>
						<li>
							<a rel="nofollow" href="/user/loginreg/login">退出登录</a>
						</li>
					</ul>
					</span>
					<span class="sep">|</span>
					<a class="link order" rel="nofollow" href="/order/show" target="_self">我的订单</a>
				</div>
			</div>
		</div>

		<div class="page-main">
			<div class="container">
				<div class="cart-empty">
					<h2>您的购物车还是空的！</h2>
					<a class="btn btn-primary btn-shopping" href="/product/fytype">马上去购物</a>
				</div>
				<div class="cart-recommend container">
					<h2 class="cart-recommend-title">
						<span>为您推荐</span>
					</h2>
					<div class="xm-recommend">
						<ul class="row">
							<c:forEach items="${list}" var="pro" varStatus="i">
								<li class="xm-recommend-list span4">
									<dl>
										<dt>
											<a href="/product/pro?pid=${pro.pId}" target="_blank">
												<img src="http://localhost:8083/fileserver/wares/${pro.img}" />
											</a>
										</dt>
										<dd class="xm-recommend-name">
											<a href="/product/pro?pid=${pro.pId}" target="_blank">${pro.proName} ${pro.color} ${pro.edition}</a>
										</dd>
										<dd class="xm-recommend-price">${pro.price}元</dd>
										<dd class="xm-recommend-tips">
											<a class="btn btn-small btn-line-primary xm-recommend-btn" href="${path}/shopcar/addcar?waresId=${pro.pId}&waresColor=${pro.color}&waresEdition=${pro.edition}&waresPrice=${pro.price}&waresImg=${pro.img}">加入购物车</a>
										</dd>
									</dl>
								</li>
							</c:forEach>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="site-info">
			<div class="footer w1210 bc mt10">
			<div class="mt20">Joinlabs商城|JYUI|聊|多看书城|JY路由器|视频电话|JY天猫店|JY淘宝直营店|JY网盟|JY移动|隐私政策|Select Region</div>
			<div>©JY.com 京ICP证110507号 京ICP备10046444号 京公网安备11010802020134号 京网文[2014]0059-0009号</div> 
			<div>违法和不良信息举报电话：185-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</div>
		</div>
		</div>
		
	</body>
</html>